﻿using System;
using System.Windows.Forms;

namespace Kay.Test.Demo
{
    public partial class StartUp : Form
    {
        public StartUp()
        {
            InitializeComponent();
        }

        private void button_OpenFile_Click(object sender, EventArgs e)
        {
            if (openFileDialog.ShowDialog(this) != DialogResult.OK) return;
            textBox_FileName.Text = openFileDialog.FileName;
            textBox_HashCode.Clear();
            textBox_HashCode.AppendText("HashCode：");
            textBox_HashCode.AppendText(Environment.NewLine);
            textBox_HashCode.AppendText(Helpers.GetFileHashCode(textBox_FileName.Text));
        }

        private void button_GetName_Click(object sender, EventArgs e)
        {
            label_Name.Text = RandomName.GetRandomName();
        }

        private void StartUp_Load(object sender, EventArgs e)
        {
            
        }

        private void button1_Click(object sender, EventArgs e)
        {
            //var hostName = Dns.GetHostName();
            //var hostIp = Dns.GetHostAddresses("DESKTOP-3KLRHG1");
            //Environment.Get
        }
    }
}
